package com.avecsys.quotemanager.mbeans.core;

import com.avecsys.quotemanager.ui.components.MessageDialog;
import com.avecsys.quotemanager.utils.MessageBoardUtil;

public class BaseMBean {

	private MessageDialog messageDialog = new MessageDialog("messageDialog");

	/**
	 * @return the messageDialog
	 */
	public MessageDialog getMessageDialog() {
		return messageDialog;
	}

	/**
	 * @param messageDialog
	 *            the messageDialog to set
	 */
	public void setMessageDialog(MessageDialog messageDialog) {
		this.messageDialog = messageDialog;
	}

	private boolean screenModeEdit;

	public BaseMBean() {
		super();
	}

	/**
	 * @return the screenModeEdit
	 */
	public boolean isScreenModeEdit() {
		return screenModeEdit;
	}

	/**
	 * @param screenModeEdit
	 *            the screenModeEdit to set
	 */
	public void setScreenModeEdit(boolean screenModeEdit) {
		this.screenModeEdit = screenModeEdit;
	}

	/**
	 * Method to execute any pre-routines prior to execution of actual method
	 * This should be first statement in method call
	 */
	public void executePreRoutines() {
		MessageBoardUtil.resetMessageBoard();
	}

}
